package org.example.dao;

import org.apache.ibatis.annotations.Param;
import org.example.dto.*;
import org.example.vo.*;

import javax.jnlp.IntegrationService;
import java.util.List;

public interface TestDao {
    List<CurriculumPlanDto> queryAllCurriculumPlan();
    Integer addCurriculumPlan(CurriculumPlanVo curriculumPlan);
    Integer deleteCurriculumPlan(int id);
    Integer updateCurriculumPlan(CurriculumPlanVo curriculumPlan);
    Integer queryCurriculumPlanIdByName(String curriculumPlanName);
    CurriculumPlanDto queryCurriculumPlanNameById(Integer id);
    Integer count();
    Integer countCurriculumPlanBySchoolYearAndSemester(@Param("schoolYear") String schoolYear, @Param("semester") String semester);

    List<GiveInstructionDto> queryAllGiveInstruction();
    List<GiveInstructionDto> queryCurriculumByName(String curriculumName);
    Integer countCurriculum();

    GiveInstructionDto queryCurriculumById(Integer id);

    List<CurriculumDto> queryAllCurriculum();
    Integer deleteCurriculum(Integer curriculumId);
    Integer updateCurriculum(CurriculumVo curriculum);
    Integer addCurriculum(CurriculumVo curriculum);
    Integer countCurriculum_();
    CurriculumDto queryCurriculumById_(Integer curriculumId);
    List<CurriculumDto> queryCurriculumByCurriculumCharacteristics(String curriculumCharacteristics);
    Integer countCurriculumByCurriculumCharacteristics( String curriculumCharacteristics );

    Integer addGiveInstruction(GiveInstructionVo giveInstruction);
    Integer deleteGiveInstruction(Integer curriculumId);
    Integer updateGiveInstruction(GiveInstructionVo giveInstruction);
    List<GiveInstructionDto> queryGiveInstructionByTeacher(String teacherName);
    GiveInstructionDto queryGiveInstructionByCurriculumId(Integer curriculumId);
    Integer countGiveInstruction();
    Integer countGiveInstructionByTeacherName(String teacherName);


    Integer addDepartment(DepartmentVo department);
    Integer updateDepartment(DepartmentVo department);
    Integer deleteDepartment(Integer departmentId);
    List<DepartmentDto> queryAllDepartment();
    Integer countDepartment();
    DepartmentDto queryDepartmentByName(String departmentName);
    DepartmentDto queryDepartmentById(Integer departmentId);

    Integer addMajor(MajorVo major);
    Integer updateMajor(MajorVo major);
    Integer deleteMajor(Integer majorId);
    List<MajorDto> queryAllMajor();
    Integer countMajor();
    List<MajorDto> queryMajorByDepartmentName(String departmentName);
    MajorDto queryMajorById(Integer majorId);
    Integer countMajorByDepartment(String department);

    Integer addGrade(GradeVo grade);
    Integer updateGrade(GradeVo grade);
    Integer deleteGrade(Integer gradeId);
    List<GradeDto> queryAllGrade();
    Integer countGrade();
    List<GradeDto> queryGradeByDepartmentAndMajor(@Param("departmentName") String department, @Param("majorName") String major);
    GradeDto queryGradeById(Integer gradeId);
    Integer countGradeByDepartmentAndMajor(@Param("departmentName") String department, @Param("majorName") String major);

    Integer addClass(ClassVo classVo);
    Integer updateClass(ClassVo classVo);
    Integer deleteClass(Integer classId);
    List<ClassDto> queryAllClass();
    Integer countClass();
    List<ClassDto> queryClassByDepartmentAndMajorAndGrade(@Param("departmentName") String department, @Param("majorName") String major, @Param("gradeName") String grade);
    ClassDto queryClassById(Integer classId);
    Integer countClassByDepartmentAndMajorAndGrade(@Param("departmentName") String department, @Param("majorName") String major, @Param("gradeName") String grade);


    Integer addBuilding(BuildingVo building);
    Integer updateBuilding(BuildingVo building);
    Integer deleteBuilding(Integer buildingId);
    List<BuildingDto> queryAllBuilding();
    Integer countBuilding();
    BuildingDto queryBuildingByName(String buildingName);
    BuildingDto queryBuildingById(Integer buildingId);

    Integer addClassroom(ClassroomVo classroomVo);
    Integer updateClassroom(ClassroomVo classroomVo);
    Integer deleteClassroom(Integer classroomId);
    List<ClassroomDto> queryAllClassroom();
    Integer countClassroom();
    ClassroomDto queryClassroomById(Integer classroomId);
    List<ClassroomDto> queryClassroomByBuilding(String buildingName);
    Integer countClassroomByBuilding(String buildingName);
    List<ClassroomDto> queryClassroomByBuildingAndClassroomType(@Param("buildingName") String buildingName, @Param("classroomType") String classroomType);
    Integer countClassroomByBuildingAndClassroomType(@Param("buildingName") String buildingName, @Param("classroomType") String classroomType);

    Integer addTeacher(TeacherVo teacher);
    Integer updateTeacher(TeacherVo teacher);
    Integer deleteTeacher(Integer teacherId);
    List<TeacherDto> queryAllTeacher();
    Integer countTeacher();
    TeacherDto queryTeacherByName(String teacherName);
    TeacherDto queryTeacherById(Integer teacherId);

    Integer addStudent(StudentVo studentVo);
    Integer updateStudent(StudentVo studentVo);
    Integer deleteStudent(Integer studentId);
    List<StudentDto> queryAllStudent();
    Integer countStudent();
    StudentDto queryStudentById(Integer studentId);
    StudentDto queryStudentByName(String studentName);
    List<StudentDto> queryStudentByDepartmentAndMajorAndGradeAndClass(@Param("department") String department, @Param("major") String major, @Param("grade") String grade, @Param("classname") String classes);
    Integer countStudentByDepartmentAndMajorAndGradeAndClass(@Param("department") String department, @Param("major") String major, @Param("grade") String grade, @Param("classname") String classes);
}
